/**
 * 
 */
package TelitPy;

import COMM232.DriverSerial;

/**
 * @author Emerson Beserra
 *
 */
public class Sender
{

	private DriverSerial driver;
	
	private TimeOut timeOut;
	
	public Sender( DriverSerial driver, TimeOut timeOut )
	{
		this.driver = driver;
		this.timeOut = timeOut;
	}
	
	public void send( String str )
	{
		driver.sendBytes(str);
		timeOut.start();
		while( driver.isTxRdy() == false )
			continue;//espera pra terminar toda a transmissao
	}//end send()---------------------------------------------------------------
	
	public void send( int[] i )
	{
		driver.sendBytes(i);
		timeOut.start();
		while( driver.isTxRdy() == false )
			continue;//espera pra terminar toda a transmissao
	}//end send()---------------------------------------------------------------
}
